.TH FBC 1 "2014-09-16" "FreeBASIC Compiler 1.06.0" "FreeBASIC Compiler"
.SH NAME
fbc \- The FreeBASIC compiler
.SH DESCRIPTION
Compiles FreeBASIC source code files (*.bas) to native code.
.SH SYNOPSIS
.B fbc \fR[\fIoptions\fR] \fIinput-files\fR

.SH OPTIONS
.F
.TP
.I input-files\fR
\fB*.a\fR = library, \fB*.o\fR = object, \fB*.bas\fR = source, \fB*.rc\fR = win32 resource script, \fB*.res\fR = win32 compiled resource, \fB*.xpm\fR = X11 icon resource
.TP
\fB\@\fIfile\fR
Read more command line arguments from a file
.TP
\fB\-a\fR \fIfile\fR
Treat file as .o/.a input file
.TP
\fB\-arch\fR \fItype\fR
Set target architecture (default: \fB486\fR)
.TP
\fB\-asm\fR \fBatt\fR|\fBintel\fR
Set the assembler format for Asm blocks and for code generation (x86 only)
.TP
\fB\-b\fR \fIfile\fR
Treat file as .bas input file
.TP
\fB\-c\fR
Compile only, do not link
.TP
\fB\-C\fR
Preserve temporary .o files
.TP
\fB\-d\fR \fIname\fR[\fB=\fIval\fR]
Add a global #define
.TP
\fB\-dll\fR
Same as \fB\-dylib\fR
.TP
\fB\-dylib\fR
Create a Win32 DLL or Linux/*BSD shared library
.TP
\fB\-e\fR
Enable runtime error checking
.TP
\fB\-ex\fR
\fB-e\fR plus RESUME support
.TP
\fB\-exx\fR
\fB-ex\fR plus array bounds/null-pointer checking
.TP
\fB\-export\fR
Export symbols for dynamic linkage
.TP
\fB\-forcelang\fR \fIname\fR
Override #lang statements in source code
.TP
\fB\-fpmode\fR \fBfast\fR|\fBprecise\fR
Select floating-point math accuracy/speed
.TP
\fB\-fpu\fR \fBx87\fR|\fBsse\fR
Set target FPU
.TP
\fB\-g\fR
Add debug info
.TP
\fB\-gen\fR \fBgas\fR|\fBgcc\fR|\fBllvm\fR
Select code generation backend
.TP
\fB\-i\fR \fIpath\fR
Add an include file search path
.TP
\fB\-include\fR \fIfile\fR
Pre-#include a file for each input .bas
.TP
\fB\-l\fR \fIname\fR
Link in a library
.TP
\fB\-lang\fR \fIname\fR
Select FB dialect: \fBfb\fR (default), \fBdeprecated\fR, \fBqb\fR
.TP
\fB\-lib\fR
Create a static library
.TP
\fB\-m\fR \fIname\fR
Set main module (default if not -c: first input .bas)
.TP
\fB\-map\fR \fIfile\fR
Save linking map to file
.TP
\fB\-maxerr\fR \fIn\fR
Only show \fIn\fR errors
.TP
\fB\-mt\fR
Use thread-safe FB runtime
.TP
\fB\-nodeflibs\fR
Do not include the default libraries
.TP
\fB\-noerrline\fR
Do not show source context in error messages
.TP
\fB\-o\fR \fIfile\fR
Set .o file name for corresponding input .bas
.TP
\fB\-O\fR \fIvalue\fR
Optimization level (default: 0)
.TP
\fB\-p\fR \fIpath\fR
Add a library search path
.TP
\fB\-pic\fR
Generate position-independent code (non-x86 Unix shared libs)
.TP
\fB\-pp\fR
Write out preprocessed input file (.pp.bas) only
.TP
\fB\-prefix\fR \fIpath\fR
Set the compiler prefix path
.TP
\fB\-print\fR \fBhost\fR|\fBtarget\fR
Display host/target system name
.TP
\fB\-print\fR \fBx\fR
Display output binary/library file name (if known)
.TP
\fB\-profile\fR
Enable function profiling
.TP
\fB\-r\fR
Write out .asm (-gen gas) or .c (-gen gcc) only
.TP
\fB\-rr\fR
Write out the final .asm only
.TP
\fB\-R\fR
Preserve the temporary .asm/.c file
.TP
\fB\-RR\fR
Preserve the final .asm file
.TP
\fB\-s\fR \fBconsole\fR|\fBgui\fR
Select win32 subsystem
.TP
\fB\-static\fR
Prefer static libraries over dynamic ones when linking
.TP
\fB\-t\fR \fIvalue\fR
Set Win32/DOS .exe stack size in kbytes, default: 1024
.TP
\fB\-target\fR \fIname\fR
Set cross-compilation target
.TP
\fB\-title\fR \fIname\fR
Set XBE display title (XBox)
.TP
\fB\-v\fR
Be verbose
.TP
\fB\-vec \fIn\fR
Automatic vectorization level (default: 0)
.TP
\fB\-version\fR
Show compiler version
.TP
\fB\-w\fR \fBall\fR|\fBpedantic\fR|\fIn\fR
Set minimum warning level: \fBall\fR, \fBpedantic\fR, or an integer
.TP
\fB\-Wa\fR \fIa,b,c\fR
Pass options to GAS
.TP
\fB\-Wc\fR \fIa,b,c\fR
Pass options to GCC (with -gen gcc)
.TP
\fB\-Wl\fR \fIa,b,c\fR
Pass options to LD
.TP
\fB\-x \fIfile\fR
Set output executable/library file name
.TP
\fB\-z gosub-setjmp\fR
Use setjmp/longjmp to implement GOSUB

.SH ENVIRONMENT
.IP AS
Overrides location of GNU as (assembler)
.IP LD
Overrides location of GNU ld (linker)
.IP GCC
Overrides location of gcc (-gen gcc)

.SH "SEE ALSO"
The full language specification and help is available in wiki format at
.B 
http://www.freebasic.net/wiki/
.SH COPYRIGHT
Copyright \(co 2004\-2013 The FreeBASIC Development Team
.br
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
.SH BUGS
Any bugs should be reported on the Sourceforge.net tracker located at http://www.sourceforge.net/projects/fbc

.SH AUTHOR
This manpage written by Ebben Feagan (ebben.feagan@gmail.com)
